#!/bin/bash

# ***************************************************************************
# * 
# * @file:build.sh 
# * @author:ebayboy@163.com 
# * @date:2019-11-26 22:59 
# * @version 1.0  
# * @description: Shell script 
# * @Copyright (c)  all right reserved 
#* 
#**************************************************************************/ 

#上一级目录名称

PREFIX=/usr/local/jansson

rm build -rf && mkdir build && cd build

cmake --with-pic \
	../ -DCMAKE_INSTALL_PREFIX=$PREFIX	\
	-DJANSSON_LIBRARY=$PREFIX/lib \
	-DJANSSON_INCLUDE_DIR=$PREFIX/include || exit 1

make install

exit 0
